home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / UTILFILE / UNPROPTC.LZH / COMMAND.MOD < prev    next >
Text File  |  1982-10-28  |  10KB  |  394 lines

  1.  
  2.  
  3.          PC/DOS R1.1 Resident COMMAND.COM Modification
  4.  
  5.  
  6.                           RESIDENT COMMAND INTERPRETER
  7.  
  8.                                        by
  9.                                   John Chapman
  10.                                844 S. Madison St. 
  11.                             Hinsdale, Illinois 60521
  12.  
  13.                              COMPUSERV ID 70205,1217
  14.  
  15.  
  16.         DISCLAIMER
  17.  
  18.         This  modification is provided without warranty of any kind.  The 
  19.         author  assumes no liability for failure of this code to  perform 
  20.         in  any  environment.  The  user is  completely  responsible  for 
  21.         determining   the  applicability  of  this  modification   to   a 
  22.         particular environment.  
  23.  
  24.            
  25.         LIMITATIONS
  26.  
  27.         This modification causes the transient portion of COMMAND.COM  to 
  28.         be  made resident at system IPL.   Re-booting the system with  an 
  29.         unmodified   COMMAND.COM   is  the  only  way  to   remove   this 
  30.         modification.
  31.  
  32.         This modification alters the starting segment [paragraph] address 
  33.         available  to programs,  lowering the amount of storage available 
  34.         by 4288 bytes [for PC/DOS 1.1 with a normal load segment  address 
  35.         of  02C1.   The  starting segment of COMMAND.COM can be found  at 
  36.         location 0000:9E, and should display [debug] as 
  37.  
  38.         0000:009E 2C 01
  39.  
  40.          
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.          John Chapman  [Compuserv 70205,1217]                 Page 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.          PC/DOS R1.1 Resident COMMAND.COM Modification
  70.  
  71.  
  72.         PC/DOS Initialization Overview
  73.  
  74.         The  IBM  Personal  Computer DOS is brought in from disk  by  the 
  75.         bootstrap loader read from track 0 of drive A by the ROM routines
  76.         after the initial hardware tests are performed at  power-on,  and 
  77.         subsequently  when  ALT-CTRL-DEL re-boot is  requested.  In  both 
  78.         cases, the following sequence occurs:
  79.  
  80.              1) The "boot" program is read from track 0.
  81.  
  82.              2) It reads IBMBIO.COM  from  a  specific location
  83.  
  84.              3) IBMBIO is given control and builds the environmental
  85.                 control blocks, initializes peripherals, and then
  86.                 reads IBMDOS.COM from its specific location on disk
  87.  
  88.              4) IBMDOS is passed control. After initializing the 
  89.                 remainder of the operating system, IBMDOS loads
  90.                 the COMMAND.COM file [the command interpreter], and
  91.                 passes it control
  92.  
  93.              5) The command interpreter immediately relocates all of the
  94.                 main line code for command prompting,  parsing,  and  the 
  95.                 code which supports the resident commands to the high end 
  96.                 of memory, where it can be more easily destroyed by 
  97.                 wandering programs.
  98.  
  99.              6) Resident COMMAND.COM will now [pretend to] detect a
  100.                 checksum error in the transient portion of itself,
  101.                 immediately causing a Re-load from disk, thus setting
  102.                 the tone for a long and tedious interaction, interrupted
  103.                 frequently by disk I/O and requests for a DOS disk
  104.                 in the default drive.
  105.          
  106.         This  set  of  two  DEBUG scripts will  alter  the  IBM  Personal 
  107.         Computer DOS command interpreter (COMMAND.COM) to remain entirely 
  108.         resident,  rather than be half resident and half  transient.  The 
  109.         whole purpose of this modification is to suppress 99% of the 
  110.         occurrances  of the refresh of the transient portion.  This  will 
  111.         remove  the  requirement  to  ALWAYS have a  disk  with  a  valid 
  112.         COMMAND.COM  in drive A.  This change has been especially  useful 
  113.         with   multiple   DISKCOPY  type  activities,   and  with   those 
  114.         application packages which use all of memory,  including the  top 
  115.         4880 bytes where the transient COMMAND.COM resides.
  116.  
  117.         **NOTE**
  118.  
  119.         We   have  experienced  a  limited  number  of  cases  where  the 
  120.         refreshable,  or  transient portion of  COMMAND.COM,   which  now 
  121.         resides in LOW memory,  has been damaged.  This damage causes the 
  122.         checksum code to refresh the transient portion from dosk.  If you 
  123.         experience  repeated  occurances of this,  see Part Two  ov  this 
  124.         modification.
  125.  
  126.  
  127.  
  128.  
  129.          John Chapman  [Compuserv 70205,1217]                 Page 2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.          PC/DOS R1.1 Resident COMMAND.COM Modification
  136.  
  137.  
  138.  
  139.                                       Part One  
  140.  
  141.         Begin  installation  by copying the "model" PC/DOS  diskette  you 
  142.         wish to modify onto a fresh diskette using DISKCOPY.   If you are 
  143.         producing  a  system  diskette that will NOT have a copy  of  the 
  144.         DEBUG  command  on  it,  you  must have  a  diskette  with  DEBUG 
  145.         available.
  146.  
  147.  
  148.         Part One: DEBUG Script  
  149.  
  150.         DEBUG COMMAND.COM <cr>
  151.  
  152.         -d,0460,0479 <cr>
  153.  
  154.         XXXX:0460 46 00 A3 03 01 A1 02 00-8C 1E 05 01 A3 52 04 2D
  155.  
  156.         XXXX:0470 0C 01 90 A3 4F 04 E8 1B-FE E8
  157.  
  158.  
  159.         -d,10D3,10D7
  160.  
  161.         XXXX:10D3 8C C8 05 C0 00
  162.  
  163.         **Verify the above displayed bytes.  THE CONTENTS OF THIS DISPLAY 
  164.         MUST  MATCH EXACTLY.  If any discrepancies are detected,  DO  NOT 
  165.         INSTALL ANY OF THE PATCH WHICH FOLLOWS.
  166.  
  167.  
  168.  
  169.          
  170.         -e,460,54,00,A3,4F,04,05,0C,01 <cr>
  171.  
  172.         -e,46C,40,A3,03,01,A1,02,00,A3,52 <cr>
  173.  
  174.         -e,479,B8 <cr>
  175.  
  176.         -e,658,90,A1,02,00,2B,06,9F <cr>
  177.  
  178.         -e,65F,0F,BA,10,00,F7,E2,73 <cr>
  179.  
  180.         -e,10D3,90,A1,02,00,48 <cr>
  181.  
  182.  
  183.         **The above enters the first section of the patch.
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.          John Chapman  [Compuserv 70205,1217]                 Page 3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.          PC/DOS R1.1 Resident COMMAND.COM Modification
  202.  
  203.  
  204.                                 Part One (Continued)   
  205.  
  206.         Next, we will display the modified code, to verify that the patch 
  207.         was correctly installed:
  208.  
  209.         -u,045F,0479 <cr>
  210.  
  211.              ADD  AX,0054
  212.              MOV  [044F],AX
  213.              ADD  AX,010C
  214.              MOV  [0105],DS
  215.              INC  AX
  216.              MOV  [0103],AX
  217.              MOV  AX,[0002]
  218.              MOV  [0452],AX
  219.              CALL 0294
  220.              MOV  AX,FDB4
  221.  
  222.         -u,0658,0665 <cr>
  223.  
  224.              NOP
  225.              MOV  AX,[0002]
  226.              SUB  AX,[0F9F]
  227.              MOV  DX,0010
  228.              MUL  AX,DX
  229.              JNC  066A
  230.  
  231.         -u,10D3,10D7
  232.  
  233.              NOP
  234.              MOV  AX,[0002]
  235.              DEC  AX
  236.  
  237.  
  238.         Before  proceeding to the next entry,  you must verify  that  the 
  239.         display  produced  by  "Unassemble" on your machine  matches  the 
  240.         display shown above; if it does, then proceed with:
  241.  
  242.         -w <cr>
  243.  
  244.          WRITING 135F BYTES  
  245.  
  246.         -q <cr>
  247.         A>  ***WHEN THE "A" PROMPT APPEARS YOU ARE READY TO REBOOT***
  248.  
  249.         You should use this modification with only this portion installed 
  250.         UNLESS you encounter any of the problems described in the  second 
  251.         section.
  252.         Please  do  not install PART TWO of this modification unless  you 
  253.         experience a problem using PART ONE by itself. 
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.          John Chapman  [Compuserv 70205,1217]                 Page 4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.          PC/DOS R1.1 Resident COMMAND.COM Modification
  268.  
  269.  
  270.  
  271.           Part Two: Refresh Suppression
  272.  
  273.  
  274.         We have experienced a limited number of cases where the 'refresh' 
  275.         of the transient portion of COMMAND.COM, which now resides in LOW 
  276.         memory,  has been damaged.   This damage causes the checksum code 
  277.         to refresh the transient portion from disk.
  278.  
  279.         The  changes  provided  in Part  Two  allow  specific  protection 
  280.         against  the damage possible in an environment where a program[s] 
  281.         has been written with specific architecture dependencies.
  282.  
  283.  
  284.         IF, and ONLY IF, you receive the  "Insert DOS Disk in DRIVE A and 
  285.         strike  any key when ready"  message,  or see that an unsolicited 
  286.         I/O 
  287.         has occurred on the default drive during program execution..
  288.  
  289.         AND ONE OF THESE OCCURANCES IS FOLLOWED BY A SYSTEM "HANG" 
  290.  
  291.  
  292.         If it becomes necessary to apply Part TWO, please document to the 
  293.         author  the  circumstances that caused the  hang,  including,  if 
  294.         possible,  the  [source]  program  that  was  executing.  If  the 
  295.         software you were using is proprietary, please indicate:
  296.         a) The package name, vendor, etc.
  297.         b) The memory size on your machine, and
  298.         c)  The  language used to produce the program  which  caused  the 
  299.         modified command interpreter  to "hang".
  300.  
  301.         **PLEASE  REPORT  BUGS**   to the address/id shown on  the  first 
  302.         page.
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.          John Chapman  [Compuserv 70205,1217]                 Page 5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.          PC/DOS R1.1 Resident COMMAND.COM Modification
  334.  
  335.  
  336.  
  337.  
  338.          Part Two: DEBUG Script 
  339.  
  340.  
  341.  
  342.         DEBUG COMMAND.COM  <cr>
  343.  
  344.         -d,111B,111E <cr>
  345.  
  346.         XXXX:111B 3B D1 77 51
  347.  
  348.         -d,1134,1137 <cr>
  349.  
  350.         XXXX:1136 3B D1 77 38
  351.  
  352.  
  353.         As before, be sure that the displays above match your system, and 
  354.         do not enter the patch below unless each byte verifies.
  355.  
  356.  
  357.         -e,023A,90,90 <cr>
  358.  
  359.         -e,0242,90,90 <cr>
  360.  
  361.         -e,0246,90,90 <cr>
  362.  
  363.         -e,03ED,00 <cr>
  364.  
  365.         -e,111D,90,90 <cr>
  366.          
  367.         -e,1136,90,90 <cr>
  368.  
  369.  
  370.         -w <cr> 
  371.  
  372.  
  373.         WRITING 135F BYTES
  374.  
  375.  
  376.         -Q <cr>
  377.  
  378.  
  379.  
  380.         A>  *** reboot at this point ***
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.          John Chapman  [Compuserv 70205,1217]                 Page 6
  394.